import moment from "moment";

//处理权限等级过滤器方法
export const rank = (v: string) => {
  let result = "";
  switch (v + "") {
    case "0":
      result = "一级";
      break;
    case "1":
      result = "二级";
      break;
    case "2":
      result = "三级";
      break;
  }

  return result;
};

//时间过滤器
export const dateTime = (t: number) => {
  console.log("t:", t);
  return moment(t * 1000).format("YYYY年MM月DD日,HH时mm分ss秒");
};
